package com.lianzai.camera.dao;

import com.lianzai.camera.model.CameraInfo;
import com.lianzai.mobile.domain.CommunityInfoDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 相机表
 */
@Mapper
public interface CameraInfoDao {

	CameraInfo getCameraById(Long cameraId);

	CommunityInfoDO getCommunityByCameraId(Long cameraId);

	List<CameraInfo> list(Map<String, Object> map);

	int count(Map<String, Object> map);

	List<Map> queryAllCameraList();

	int save(CameraInfo cameraInfo);

	int updateCamera(CameraInfo cameraInfo);

	int delCamera(int id);

	/*int updateCameraStatus(
			@Param("id")int id,
			@Param("status")int status
	);*/
	int updateCameraStatus(Map map);

	int updateSyncStatus(CameraInfo cameraInfo);

	Map queryCameraInformationByIp(
            @Param("cameraIp") String cameraIp
    );
}
